package com.veo.service.Impl;

import com.veo.dao.AdminDao;
import com.veo.entity.Admin;
import com.veo.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("adminService")
@Transactional()
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminDao adminDao;
    @Override
    public List<Admin> getAllAdmin() {
        return adminDao.getAllAdmin();
    }

    @Override
    public void deleteAdmin(Admin admin) {
        adminDao.deleteAdmin(admin);
    }

    @Override
    public void addAdmin(Admin admin) {
        adminDao.addAdmin(admin);
    }

    @Override
    public void updateAdmin(Admin admin) {
        adminDao.updateAdmin(admin);
    }

    @Override
    public Admin findLoginAdmin(Admin admin) {
        return adminDao.findLoginAdmin(admin);
    }

    @Override
    public boolean findUsername(Admin admin) {
        return adminDao.findUsername(admin);
    }
}
